package com.jd.platform.gobrs.common.model;


import com.jd.platform.gobrs.common.model.typeenum.CacheType;
import com.jd.platform.gobrs.common.model.typeenum.KeyType;

/**
 * 热key的定义
 *
 * @author sizegang wrote on 2019-12-05
 * @version 1.0
 */
public class GCacheKeyModel extends BaseModel  {
    /**
     * 来自于哪个应用
     */
    private String appName;
    /**
     * key的类型（譬如是接口、热用户、redis的key等）
     */
    private KeyType keyType;
    /**
     * 是否是删除事件
     */
    private boolean remove;
    /**
     * cacheType 缓存类型 手动上报 自动智能cache 通过内存计算 缓存排名 推荐合理的缓存策略 可动态批量设置设置缓存
     */
    private CacheType cacheType;

    private Long size;



    @Override
    public String toString() {
        return "appName:" + appName + "-key=" + getKey();
    }

    public boolean isRemove() {
        return remove;
    }

    public void setRemove(boolean remove) {
        this.remove = remove;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public KeyType getKeyType() {
        return keyType;
    }

    public void setKeyType(KeyType keyType) {
        this.keyType = keyType;
    }

    public CacheType getCacheType() {
        return cacheType;
    }

    public void setCacheType(CacheType cacheType) {
        this.cacheType = cacheType;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }
}
